#Makefile to build shiehub-java-sdk-opengw

#build jar file
SDK_VERSION ?= 0.7

all: jarfile jardocfile jarsourcefile

jarfile:
	@echo "开始构建jar文件"
	mvn clean install
jardocfile:
	@echo "开始构建doc jar文件"
	jar -cvf shiehub-java-sdk-opengw-${SDK_VERSION}-javadoc.jar README.md
jarsourcefile:
	@echo "开始构建source jar文件"
	jar -cvf shiehub-java-sdk-opengw-${SDK_VERSION}-sources.jar README.md
buildasc:
	@echo "开始签名"
	mv target/shiehub-java-sdk-opengw-${SDK_VERSION}.jar .
	gpg -ab shiehub-java-sdk-opengw-${SDK_VERSION}.jar
	cp /Users/guoleijie/.m2/repository/com/shiehub/shiehub-java-sdk-opengw/${SDK_VERSION}/
	shiehub-java-sdk-opengw-${SDK_VERSION}.pom
	gpg -ab shiehub-java-sdk-opengw-${SDK_VERSION}.pom
	gpg -ab shiehub-java-sdk-opengw-${SDK_VERSION}-sources.jar
	gpg -ab shiehub-java-sdk-opengw-${SDK_VERSION}-javadoc.jar

jarbundle:
	jar -cvf bundle.jar shiehub-java-sdk-opengw*
